<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="keywords" content="小有的个人主页">
    <meta name="description" content="小有的个人页面，喜欢收集一些感兴趣的东西，爱好设计和编程、旅行、摄影。在这里你可以观看到我近期的作品...">
    <meta name="author" content="小有的个人主页">
    <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-redefine.png">
    
    <!--- Seo Part-->
    
    <link rel="canonical" href="https://weiyouyuan168.gitee.io/new-blog/2023/03/12/填空题/"/>
    <meta name="robots" content="index,follow">
    <meta name="googlebot" content="index,follow">
    <meta name="revisit-after" content="1 days">
    <meta property="og:type" content="article">
    <meta property="og:title" content="填空题">
    <meta property="og:description" content="小有的个人页面，喜欢收集一些感兴趣的东西，爱好设计和编程、旅行、摄影。在这里你可以观看到我近期的作品...">
    <meta property="og:url" content="https://weiyouyuan168.gitee.io/new-blog2023/03/12/填空题/">
    
    <meta property="og:site_name" content="小有·Xiao You Zi的个人主页">
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:title" content="填空题">
    <meta name="twitter:description" content="小有的个人页面，喜欢收集一些感兴趣的东西，爱好设计和编程、旅行、摄影。在这里你可以观看到我近期的作品...">
    <meta name="twitter:image" content="/new-blog/images/redefine-logo.svg">
    <!--- Icon Part-->
    <link rel="icon" type="image/png" href="./new-blog/images/redefine-logo.svg" sizes="192x192">
    <link rel="apple-touch-icon" sizes="180x180" href="./new-blog/images/redefine-logo.svg">
    <meta name="theme-color" content="#005080">
    <link rel="shortcut icon" href="././new-blog/images/redefine-logo.svg">
    
    <title>
        
            填空题 -
        
        小有·Xiao You Zi的个人主页
    </title>
    
<link rel="stylesheet" href="./css/style.css">

    
<link rel="stylesheet" href="./assets/fonts.css">

    
    
        <link href="" rel="stylesheet">
    
    
    <script id="hexo-configurations">
    let REDEFINE = window.REDEFINE || {};
    REDEFINE.hexo_config = {"hostname":"weiyouyuan168.gitee.io","root":"./","language":"zh-CN"};
    REDEFINE.theme_config = {"toc":{"enable":true,"number":false,"expand_all":true,"init_open":true},"style":{"primary_color":"#005080","avatar":"/new-blog/images/redefine-avatar.svg","favicon":"/new-blog/images/redefine-logo.svg","og_image":{"enable":false,"image_url":null},"article_img_align":"center","right_side_width":"210px","content_max_width":"1000px","nav_color":{"left":"#f78736","right":"#367df7","transparency":35},"hover":{"shadow":true,"scale":false},"first_screen":{"enable":true,"background_image":{"light":"/new-blog/images/wallhaven-wqery6-light.webp","dark":"/new-blog/images/wallhaven-wqery6-dark.webp"},"title_color":{"light":"#fff","dark":"#d1d1b6"},"description":"小有的个人主页","custom_font":{"enable":false,"font_family":null,"font_url":null}},"scroll":{"progress_bar":{"enable":true},"percent":{"enable":false}}},"local_search":{"enable":false,"preload":true},"code_block":{"copy":true,"style":"mac","custom_font":{"enable":true,"font_family":null,"font_url":null}},"pjax":{"enable":true},"lazyload":{"enable":true},"version":"1.2.0","friend_links":{"columns":2},"home_article":{"date_format":"auto","category":{"enable":true,"limit":3},"tag":{"enable":true,"limit":3}},"plugins":{"aplayer":{"enable":false,"audio":[{"name":null,"artist":null,"url":null,"cover":null},{"name":null,"artist":null,"url":null,"cover":null}]}}};
    REDEFINE.language_ago = {"second":"%s 秒前","minute":"%s 分钟前","hour":"%s 小时前","day":"%s 天前","week":"%s 周前","month":"%s 个月前","year":"%s 年前"};
  </script>
    
    
<link rel="stylesheet" href="./fontawesome/fontawesome.min.css">

    
<link rel="stylesheet" href="./fontawesome/brands.min.css">

    
<link rel="stylesheet" href="./fontawesome/solid.min.css">

    
<link rel="stylesheet" href="./fontawesome/regular.min.css">

    
    
    
    
<meta name="generator" content="Hexo 6.3.0"></head>


<body>
<div class="progress-bar-container">
    
        <span class="scroll-progress-bar"></span>
    

    
        <span class="pjax-progress-bar"></span>
        <span class="pjax-progress-icon">
            <i class="fa-solid fa-circle-notch fa-spin"></i>
        </span>
    
</div>


<main class="page-container">

    

    <div class="page-main-content">

        <div class="page-main-content-top">
            <header class="menu-wrapper">
    
    <div class="menu-content">
        <div class="left">
            
            <a class="logo-title" href="/">
                
                小有·Xiao You Zi的个人主页
                
            </a>
        </div>

        <div class="right">
            <!-- PC -->
            <div class="pc">
                <ul class="menu-list">
                    
                        
                            <li class="menu-item">
                                <!-- Menu -->
                                <a class="" 
                                    href="./%E9%A6%96%E9%A1%B5"  >
                                    
                                        
                                            <i class="fa-regular fa-house"></i>
                                        
                                        首页
                                    
                                </a>
                                <!-- Submenu -->
                                
                            </li>
                    
                    
                </ul>
            </div>
            <!-- Mobile -->
            <div class="mobile">
                
                <div class="icon-item menu-bar">
                    <div class="menu-bar-middle"></div>
                </div>
            </div>
        </div>
    </div>

    <!-- Mobile drawer -->
    <div class="menu-drawer">
        <ul class="drawer-menu-list">
            
                
                    <li class="drawer-menu-item flex-center">
                        <a class="" 
                        href="./%E9%A6%96%E9%A1%B5"  >
                             
                                
                                    <i class="fa-regular fa-house"></i>
                                
                                首页
                            
                        </a>
                    </li>
                    <!-- Submenu -->
                    
            

        </ul>
    </div>

    <div class="window-mask"></div>

</header>


        </div>

        <div class="page-main-content-middle">

            <div class="main-content">

                
                    <div class="fade-in-down-animation">
    <div class="post-page-container">
        <div class="article-content-container">

            
            
                <div class="article-title">
                    <h1 class="article-title-regular">填空题</h1>
                </div>
            
                
            

            
                <div class="article-header">
                    <div class="avatar">
                        <img src="././new-blog/images/redefine-avatar.svg">
                    </div>
                    <div class="info">
                        <div class="author">
                            <span class="name">小有的个人主页</span>
                            
                                <span class="author-label">lol</span>
                            
                        </div>
                        <div class="meta-info">
                            <div class="article-meta-info">
    <span class="article-date article-meta-item">
        <i class="fa-regular fa-pen-fancy"></i>&nbsp;
        <span class="pc">2023-03-12 15:49:43</span>
        <span class="mobile">2023-03-12 15:49</span>
        <span class="hover-info">创建</span>
    </span>
    
        <span class="article-date article-meta-item">
            <i class="fa-regular fa-wrench"></i>&nbsp;
            <span class="pc">2023-03-12 16:13:43</span>
            <span class="mobile">2023-03-12 16:13</span>
            <span class="hover-info">更新</span>
        </span>
    

    
    

    
    
    
    
        <span class="article-pv article-meta-item">
            <i class="fa-regular fa-eye"></i>&nbsp;<span id="busuanzi_value_page_pv"></span>
        </span>
    
</div>

                        </div>
                    </div>
                </div>
            

            <div class="article-content markdown-body">
                <p>Java 填空题</p>
<span id="more"></span>
<div class="note-large notel-default"><div class="notel-title"><p>简述Java语言的特点。</p>
</div><div class="notel-content"><p>简单、面向对象、安全性、跨平台性、支持多线程、分布性。</p>
 </div></div>
<div class="note-large notel-default"><div class="notel-title"><p>简述Java的运行机制。</p>
</div><div class="notel-content"><p>Java程序运行时，必须经过编译和运行两个步骤。<br>       首先将后缀名为.java的源文件进行编译，生成后缀名为.class的字节码文件，<br>       然后Java虚拟机将字节码文件进行解释执行，并将结果显示出来。</p>
 </div></div>

<div class="note-large notel-default"><div class="notel-title"><p>简述Java语言中的8中基本数据类型，并说明每种数据类型所占用的空间大小。</p>
</div><div class="notel-content"><p>Java语言的八种基本数据类型有：<br>byte字节型，占一个字节。<br>short短整型，占两个字节。<br>int整型，占4个字节。<br>long长整型，占8个字节。<br>float单精度浮点型，占4个字节。<br>double双精度浮点型，占8个字节。<br>char字符型，占两个字节。<br>boolean型，表示逻辑值，有true和false两个值，分别占一个字节。</p>
 </div></div>

<div class="note-large notel-default"><div class="notel-title"><p>简述跳转语句break与continue的作用和区别。</p>
</div><div class="notel-content"><p>在switch条件语句和循环语句中都可以使用break语句。当它出现在switch条件语句中时，作用是终止某个case并跳出switch结构。当它出现在循环语句中，作用是跳出循环语句，执行循环后面的代码；continue语句用在循环语句中，它的作用是终止本次循环，执行下一次循环。</p>
 </div></div>

<div class="note-large notel-default"><div class="notel-title"><p>简述你对面向对象的三大特征的理解。</p>
</div><div class="notel-content"><p> 面向对象的特点主要可以概括为封装性、继承性和多态性。<br>其中封装是面向对象核心思想,将对象的属性和行为封装起来,不需要让外界知道具体实现细节,这就是封装思想。<br>继承性主要描述的是类与类之间的关系,通过继承”,”可以在无需重新编写原有类的情况下”,”对原有类的功能进行扩展。<br>多态性指的是在程序中允许出现重名现象,它指在一个类中定义的属性和方法被其它类继承后,它们可以具有不同的数据类型或表现出不同的行为,这使得同一个属性和方法在不同的类中具有不同的语义。</p>
 </div></div>

<div class="note-large notel-default"><div class="notel-title"><p>请简述构造方法的特点。</p>
</div><div class="notel-content"><p> (1)构造方法名与类名相同<br>(2)在构造方法名的前面没有返回值类型的声明<br>        (3)在构造方法中不能使用return语句返回一个值</p>
 </div></div>

<div class="note-large notel-default"><div class="notel-title"><p>请简述Java中继承的概念以及使用继承的好处。</p>
</div><div class="notel-content"><p>概念：在Java中,类的继承是指在一个现有类的基础上去构建一个新的类,构建出来的新类被称作子类,现有类被称作父类,子类会自动拥有父类所有可继承的属性和方法。<br>好处：继承性主要描述的是类与类之间的关系,通过继承,可以无需重新编写原有类的情况下,对原有类的功能进行使用和扩展。</p>
 </div></div>

<div class="note-large notel-default"><div class="notel-title"><p>请写出处理异常的5个关键字</p>
</div><div class="notel-content"><p>try、catch、finally、throw、throws</p>
 </div></div>

<div class="note-large notel-default"><div class="notel-title"><p>请简述try…catch语句的异常处理流程并画出流程图。</p>
</div><div class="notel-content"><p>程序通过try语句捕获可能出现的异常，如果try语句没有捕获到异常，则直接跳出try…catch语句块执行其他程序；如果在try语句中捕获到了异常，则程序会自动跳转到catch语句中找到匹配的异常类型进行相应的处理。如果try语句捕获到的异常与catch语句例的异常匹配，则先执行catch中的语句，最后执行其他程序语句。</p>
 </div></div>

<div class="note-large notel-default"><div class="notel-title"><p>请简述处理编译时异常的有两种方式。</p>
</div><div class="notel-content"><p>（1）使用try…catch语句对异常进行捕获处理。<br>（2）使用throws关键字声明抛出异常，调用者对异常进行处理。</p>
 </div></div>

<div class="note-large notel-default"><div class="notel-title"><p>简述String、StringBuffer和StringBuilder三者的区别。</p>
</div><div class="notel-content"><p>String类表示的字符串是常量，一旦创建后，内容和长度都是无法改变的。而StringBuilder和StringBuffer表示字符容器，其内容和长度可以随时修改。在操作字符串时，如果该字符串仅用于表示数据类型，则使用String类即可，但是如果需要对字符串中的字符进行增删操作，则使用StringBuffer与StringBuilder类。如果有大量字符串拼接操作，不要求线程安全的情况下，采用StringBuilder更高效。相反如果需要线程安全则需要使用StringBuffer。</p>
 </div></div>

<div class="note-large notel-default"><div class="notel-title"><p>简述8中基本数据类型及其对应的包装类。</p>
</div><div class="notel-content"><p>基本数据类型         对应的包装类<br>     Byte                  byte<br>     Char                  Character<br>     Int                    integer<br>     Short                  short<br>     Long                   long<br>     Float                   float<br>     Double                 double<br>     Boolean                boolean</p>
 </div></div>

<div class="note-large notel-default"><div class="notel-title"><p>简述集合List、Set和Map的区别</p>
</div><div class="notel-content"><p>List的特点是元素有序、可重复。List接口的主要实现类有ArrayList和LinkedList。Set的特点是元素无序、不可重复。Set接口的主要实现类有HashSet和TreeSet。Map的特点是存储的元素是键(Key)、值(Value)映射关系，元素都是成对出现的。Map接口的主要实现类有HashMap和TreeMap。</p>
 </div></div>

<div class="note-large notel-default"><div class="notel-title"><p>简述为什么ArrayList的增删操作比较慢,查找操作比较快。</p>
</div><div class="notel-content"><p>由于ArrayList集合的底层是使用一个数组来保存元素，在增加或删除指定位置的元素时，会导致创建新的数组，效率比较低，因此不适合做大量的增删操作。但这种数组的结构允许程序通过索引的方式来访问元素，因此使用ArrayList集合查找元素很便捷。</p>
 </div></div>

<div class="note-large notel-default"><div class="notel-title"><p>简述泛型的优点</p>
</div><div class="notel-content"><p>（1）提高类型的安全性。<br>泛型的主要目标是提高Java程序的类型安全性，即可以通过泛型定义对变量类型进行限制，在对变量类型限制之后编译器可以更好的进行类型验证。<br>（2）避免强制类型转换。<br>使用泛型的另一个好处是避免源代码中的许多强制类型转换。这使得代码可读性更高，并且减少出错机会。尽管减少强制类型转换可以降低使用泛型类代码的复杂度，但是声明泛型变量会带来相应的复杂操作。</p>
 </div></div>

<div class="note-large notel-default"><div class="notel-title"><p>简述一下反射机制。</p>
</div><div class="notel-content"><p>Java的反射（reflection）机制是指在程序的运行状态中，可以构造任意一个类的对象，可以得到任意一个对象所属的类的信息，可以调用任意一个类的成员变量和方法，可以获取任意一个对象的属性和方法。这种动态获取程序信息以及动态调用对象的功能称为Java语言的反射机制。</p>
 </div></div>

<div class="note-large notel-default"><div class="notel-title"><p>简述实例化Class对象的三种方式</p>
</div><div class="notel-content"><p>（1）根据类名获取：类名.class；<br>（2）根据对象获取：对象.getClass()；<br>（3）根据全限定类名获取：Class.forName(“全限定类名”)。</p>
 </div></div>

<div class="note-large notel-default"><div class="notel-title"><p>简述字符流与字节流的区别</p>
</div><div class="notel-content"><p>字节流的两个基类是InputStream和OutputStream，字符流的两个基类是Reader和Writer，它们都是Object类的直接子类，字节流是处理以8位字节为基本单位的字节流类；Reader和Writer类是专门处理16位字节的字符流类。</p>
 </div></div>

<div class="note-large notel-default"><div class="notel-title"><p>简述InputStreamReader类与OutputStreamWriter类的作用。</p>
</div><div class="notel-content"><p>InputStreamReader是Reader的子类，它可以将一个字节输入流转换成字符输入流，方便直接读取字符。OutputStreamWriter是Writer的子类，它可以将一个字节输出流转换成字符输出流，方便直接写入字符。</p>
 </div></div>

<div class="note-large notel-default"><div class="notel-title"><p>简述JDBC编程的6个开发步骤</p>
</div><div class="notel-content"><p>1、加载并注册数据库驱动；<br>   2、通过DriverManager获取数据库连接；<br>   3、通过Connection对象获取Statement对象；<br>4、使用Statement执行SQL语句；<br>5、操作ResultSet结果集；</p>
 </div></div>


            </div>

            
                <div class="post-copyright-info">
                    <div class="article-copyright-info-container">
    <ul>
        <li>本文标题：填空题</li>
        <li>本文作者：小有的个人主页</li>
        <li>创建时间：2023-03-12 15:49:43</li>
        <li>
            本文链接：https://redefine.ohevan.com/2023/03/12/填空题/
        </li>
        <li>
            版权声明：本博客所有文章除特别声明外，均采用 <a class="license" target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">BY-NC-SA</a> 许可协议。转载请注明出处！
        </li>
    </ul>
</div>

                </div>
            

            

            

            
                <div class="article-nav">
                    
                    
                        <div class="article-next">
                            <a class="next"
                            rel="next"
                            href="./2023/03/10/Java/"
                            >
                                <span class="title flex-center">
                                    <span class="post-nav-title-item">Java复习题</span>
                                    <span class="post-nav-item">下一篇</span>
                                </span>
                                <span class="right arrow-icon flex-center">
                                    <i class="fa-solid fa-chevron-right"></i>
                                </span>
                            </a>
                        </div>
                    
                </div>
            


            
        </div>

        
            <div class="toc-content-container">
                <div class="post-toc-wrap">
    <div class="post-toc">
        <div class="toc-title">此页目录</div>
        <div class="page-title">填空题</div>
        

    </div>
</div>
            </div>
        
    </div>
</div>


                

            </div>



        </div>

        <div class="page-main-content-bottom">
            <footer class="footer">
    <div class="info-container">
        <div class="copyright-info">
            &copy;
            
              <span>2022</span>
              -
            
            2023&nbsp;&nbsp;<i class="fa-regular fa-computer-classic"></i>&nbsp;&nbsp;<a href="/">小有的个人主页</a>
        </div>
        
            <script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
            <div class="website-count info-item">
                
                    <span id="busuanzi_container_site_uv" class="busuanzi_container_site_uv">
                        访问人数&nbsp;<span id="busuanzi_value_site_uv" class="busuanzi_value_site_uv"></span>
                    </span>
                
                
                    <span id="busuanzi_container_site_pv" class="busuanzi_container_site_pv">
                        总访问量&nbsp;<span id="busuanzi_value_site_pv" class="busuanzi_value_site_pv"></span>
                    </span>
                
            </div>
        
        <div class="theme-info info-item">
           
        </div>
        
        
        
            <div id="start_time_div" style="display:none">
                2022/8/17 11:45:14
            </div>
            <div>
                博客已运行 <span class="odometer" id="runtime_days" ></span> 天 <span class="odometer" id="runtime_hours"></span> 小时 <span class="odometer" id="runtime_minutes"></span> 分钟 <span class="odometer" id="runtime_seconds"></span> 秒
            </div>
        
        
        
            <script async data-pjax>
                try {
                    function odometer_init() {
                    const elements = document.querySelectorAll('.odometer');
                    elements.forEach(el => {
                        new Odometer({
                            el,
                            format: '( ddd).dd',
                            duration: 200
                        });
                    });
                    }
                    odometer_init();
                } catch (error) {}
            </script>
        
        
        
    </div>  
</footer>
        </div>
    </div>

    
        <div class="post-tools">
            <div class="post-tools-container">
    <ul class="tools-list">
        <!-- TOC aside toggle -->
        
            <li class="right-bottom-tools page-aside-toggle">
                <i class="fa-regular fa-outdent"></i>
            </li>
        

        <!-- go comment -->
        
    </ul>
</div>

        </div>
    

    <div class="right-bottom-side-tools">
        <div class="side-tools-container">
    <ul class="unfolded-tools-list">
        <li class="right-bottom-tools tool-font-adjust-plus flex-center">
            <i class="fa-regular fa-magnifying-glass-plus"></i>
        </li>

        <li class="right-bottom-tools tool-font-adjust-minus flex-center">
            <i class="fa-regular fa-magnifying-glass-minus"></i>
        </li>

        <li class="right-bottom-tools tool-expand-width flex-center">
            <i class="fa-regular fa-expand"></i>
        </li>

        <li class="right-bottom-tools tool-dark-light-toggle flex-center">
            <i class="fa-regular fa-moon"></i>
        </li>

        <!-- rss -->
        

        
            <li class="right-bottom-tools tool-scroll-to-top flex-center">
                <i class="fa-regular fa-arrow-up"></i>
            </li>
        

        <li class="right-bottom-tools tool-scroll-to-bottom flex-center">
            <i class="fa-regular fa-arrow-down"></i>
        </li>
    </ul>

    <ul class="folded-tools-list">
        <li class="right-bottom-tools tool-toggle-show flex-center">
            <i class="fa-regular fa-cog fa-spin"></i>
        </li>
        
    </ul>
</div>

    </div>

    <div class="image-viewer-container">
    <img src="">
</div>


    


</main>




<script src="./js/utils.js"></script>

<script src="./js/main.js"></script>

<script src="./js/layouts/menu-shrink.js"></script>

<script src="./js/tools/go-top-bottom.js"></script>

<script src="./js/tools/dark-light-toggle.js"></script>





    
<script src="./js/tools/code-block.js"></script>




    
<script src="./js/layouts/lazyload.js"></script>




    
<script src="./js/tools/runtime.js"></script>

    
<script src="./js/layouts/odometer.min.js"></script>

    
<link rel="stylesheet" href="./assets/odometer-theme-minimal.css">





<div class="post-scripts pjax">
    
        
<script src="./js/tools/toc-toggle.js"></script>

<script src="./js/libs/anime.min.js"></script>

<script src="./js/layouts/toc.js"></script>

<script src="./js/plugins/tabs.js"></script>

    
    
</div>


    
<script src="./js/libs/pjax.min.js"></script>

<script>
    window.addEventListener('DOMContentLoaded', () => {
        window.pjax = new Pjax({
            selectors: [
                'head title',
                '.page-container',
                '.pjax'
            ],
            history: true,
            debug: false,
            cacheBust: false,
            timeout: 0,
            analytics: false,
            currentUrlFullReload: false,
            scrollRestoration: false,
            // scrollTo: true,
        });

        document.addEventListener('pjax:send', () => {
            REDEFINE.utils.pjaxProgressBarStart();
        });

        document.addEventListener('pjax:complete', () => {
            REDEFINE.utils.pjaxProgressBarEnd();
            window.pjax.executeScripts(document.querySelectorAll('script[data-pjax], .pjax script'));
            REDEFINE.refresh();
        });
    });
</script>




</body>
</html>
